<style>
    .video_file_box{
        display: block;
    }
    .audio_file_box{
        display: none;
    }
    .content_box{
        display: none;
    }
    .time_box{
        display: block;
    }
    .v_a_box{
        display: block;
    }
    .up_time_box{
        display: none;
    }
    .iframe_box{
        display: none;
    }
    .pdf_box{
        display: none;
    }
    .mast{
        color: red;
        font-weight: bold;
        margin-right: 4px;
    }
    .mast::after{
        content: '*';
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[typeList]-{$key}">
                    <input id="row[typeList]-{$key}" name="row[type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}
                </label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group v_a_box">
        <label class="control-label col-xs-12 col-sm-2">{:__('File_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="fileTypeList" item="vo"}
                <label for="row[file_type]-{$key}">
                    <input id="row[file_type]-{$key}" name="row[file_type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}
                </label>
                {/foreach}
            </div>

        </div>
    </div>
    <!-- 视频章节 start -->
    <div class="form-group video_file_box">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Video_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video_file" class="btn btn-danger faupload" data-input-id="c-video_file" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video_file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
        </div>
    </div>
    <!-- 视频章节 end -->
    <!-- 音频章节 start -->
    <div class="form-group audio_file_box">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Audio_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-audio_file" class="form-control" size="50" name="row[audio_file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-audio_file" class="btn btn-danger faupload" data-input-id="c-audio_file" data-multiple="false" data-preview-id="p-audio_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-audio_file" class="btn btn-primary fachoose" data-input-id="c-audio_file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-audio_file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-audio_file"></ul>
        </div>
    </div>
    <!-- 音频章节 end -->
    <!-- PDF章节 start -->
    <div class="form-group pdf_box">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Pdf_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-pdf_file" class="form-control" size="50" name="row[pdf_file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-pdf_file" class="btn btn-danger faupload" data-input-id="c-pdf_file" data-multiple="false" data-preview-id="p-pdf_file" data-mimetype="pdf"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-pdf_file" class="btn btn-primary fachoose" data-input-id="c-pdf_file" data-multiple="false" data-mimetype="application/pdf"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-pdf_file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-pdf_file"></ul>
        </div>
    </div>
    <!-- PDF章节 end -->
    <!-- 内嵌代码 start -->
    <div class="form-group iframe_box">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Iframe')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-iframe" class="form-control" rows="5" name="row[iframe]" cols="50"></textarea>
        </div>
    </div>
    <!-- 内嵌代码 end -->
    <div class="form-group time_box">
        <label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-times" class="form-control" name="row[times]" type="text">
        </div>
    </div>
    <!-- 图文章节 start -->
    <div class="form-group content_box">
        <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <!-- 图文章节 end -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-password" class="form-control" name="row[password]" type="text" placeholder="为空表示无密码">
        </div>
    </div>
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        -->
    <!--        <div class="radio">-->
    <!--        {foreach name="statusList" item="vo"}-->
    <!--        <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> -->
    <!--        {/foreach}-->
    <!--        </div>-->

    <!--    </div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Time_up')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <!--<select  id="c-time_up" data-rule="required" min="0" class="form-control selectpicker" name="row[time_up]">-->
            <!--    {foreach name="timeUpList" item="vo"}-->
            <!--        <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>-->
            <!--    {/foreach}-->
            <!--</select>-->
            <div class="radio">
                {foreach name="timeUpList" item="vo"}
                <label for="row[time_up]-{$key}">
                    <input id="row[time_up]-{$key}" name="row[time_up]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}
                </label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group up_time_box">
        <label class="control-label col-xs-12 col-sm-2">{:__('Up_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-up_time" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[up_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[course_id]" value="{:input('course_id')}">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
